import Vue from 'vue'
const defaultUrl = require('../images/newload.png')

export const imgs = Vue.directive('imgs', {
  inserted: function (el, obj) {
    if (!obj.value) {
      el.setAttribute('src', defaultUrl)
    }
  },
  update: function (el, obj) {
    if (!obj.value) {
      el.setAttribute('src', defaultUrl)
    }
  }
})
